﻿<UserControl x:Class="Samba.Modules.SettingsModule.PrinterView" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
     xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:Common="clr-namespace:Samba.Presentation.Common;assembly=Samba.Presentation.Common"
     mc:Ignorable="d">
    <Grid>
        <StackPanel>
            <Label>
                <LocText ResourceIdentifierKey="PrinterName" Suffix=":"/>
            </Label>
            <TextBox HorizontalAlignment="Left" Width="250" Text="{Binding Name}" />
            <Label>
                <LocText ResourceIdentifierKey="ShareNameAndPortName" Suffix=":"/>
            </Label>
            <ComboBox HorizontalAlignment="Left" MinWidth="250" IsEditable="True" ItemsSource="{Binding PrinterNames}"
                 Text="{Binding ShareName}" />
            <Label>
                <LocText ResourceIdentifierKey="PrinterType" Suffix=":"/>
            </Label>
            <ComboBox HorizontalAlignment="Left" MinWidth="150" ItemsSource="{Binding PrinterTypes}"
                 SelectedItem="{Binding PrinterType}" />
            <Label>
                <LocText ResourceIdentifierKey="CharacterSet" Suffix=":"/>
            </Label>
            <Common:FilteredTextBox Type="Digits" HorizontalAlignment="Left" MinWidth="100" Text="{Binding CodePage}" />
            <Label>
                <LocText ResourceIdentifierKey="LineCount" Suffix=":"/>
            </Label>
            <Common:FilteredTextBox Type="Digits" HorizontalAlignment="Left" MinWidth="100" Text="{Binding PageHeight}" />
            <Label>
                <LocText ResourceIdentifierKey="LineCharacterCount" Suffix=":"/>
            </Label>
            <Common:FilteredTextBox Type="Digits" HorizontalAlignment="Left" MinWidth="100" Text="{Binding CharsPerLine}" />
            <Button HorizontalAlignment="Left" Margin="0,10" MinWidth="70" Content="{Binding SaveCommand.Caption}"
                 Command="{Binding SaveCommand}" />
            <Label Content="{Binding Error}" Foreground="Red" />
        </StackPanel>
    </Grid>
</UserControl>